'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  //微信登陆及获取用户信息
  router.get('/login',controller.login.login);
  router.get('/user',controller.login.getUserInfo);
  //查询菜单列表
  router.get('/dishes',controller.dish.getDish);
  //创建订单
  router.post('/createOrder',controller.order.createOrder);
  //查询用户订单记录
  router.get('/orderRecord',controller.order.orderRecord);
  //根据订单号查询订单详情
  router.get('/recordDetail',controller.order.orderDetail);
};
